package com.sky.loveshop.mapper;

import com.sky.loveshop.entity.Sku;
import com.sky.loveshop.entity.qo.SkuQO;
import com.sky.loveshop.entity.qo.StockParam;
import com.sky.loveshop.entity.qo.StockRequest;
import com.sky.loveshop.entity.vo.SkuVO;
import com.sky.loveshop.utils.MyMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SkuMapper extends MyMapper<Sku> {

    List<SkuVO> searchAll(SkuQO qo);

    Sku getSkuById(@Param("id") Integer id);

    List<Sku> getSkuListByIds(@Param("ids") List<Integer> ids);

    Integer delSkuById(@Param("id") Integer id);

    Integer updateSkuById(Sku sku);

    Integer insertOne(Sku sku);

    List<Sku> getSkuListByShelfIds(@Param("ids") List<Integer> ids);

    Integer changeStockNum(StockParam stockParam);

    List<SkuVO> getDangerNumberList(StockRequest.Q1 req);

    List<Sku> getSkuListByShoIdAndSkuId(@Param("shopId") Integer shopId, @Param("productIdList") List<Integer> productIdList);
}